<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="icon" href="http://b-gold-cdn.xitu.io/favicons/v2/favicon.ico" type="image/x-icon" />
    <title><%= title %></title>
    <link href="/css/index.css?t=081f725841deba830426&081f725841deba830426" rel="stylesheet">
</head>

<body>
    <div id="app" @click="closeUserInfo">
    <div class="u_global_tip hide" :style="{display:tipStatus}" v-if="isShowTip">
        <i class="iconfont">&#xe610;</i>：欢迎您来到码咯，本网站不支持拉轰的IE浏览器，请使用&nbsp;<i class="iconfont">&#xe64c;</i>（chrome）&nbsp;或者&nbsp;<i class="iconfont">&#xe6ef;</i>（firefox）&nbsp;，谢谢
        &nbsp;&nbsp;&nbsp;&nbsp;<i class="iconfont" @click.stop="closeGlobalTip" style="cursor: pointer;">&#xe80a;</i>
    </div>
    <% if (typeof type == "undefined"){%>
    <header>
        <div class="container">
            <div class="u_logo">
                <a href="/">
                <img src="/img/832d23ef4b8cf6372d4184dbdbb1b5eb.png" alt="">
            </a>
             </div>
            <ul class="u_nav">
                <li>
                    <a class="active" title="首页" href="/">首页</a>
                </li>
                <% if (user) { %>
                <li>
                    <a title="上传" href="/upload">上传</a>
                </li>
                <% } %>
            </ul>
            <div class="u_serach">
                <input type="text" placeholder="搜索" @keyup.enter="searchAr" ref="searchInput" value="<%= typeof keyword != "undefined" ? keyword : "" %>"> 
                <i class="iconfont" @click.stop="searchAr">&#xe619;</i>
            </div>
            <div class="u_write">
                <% if (user) { %>
                <a href="/post" class="u_wr_c"><i class="iconfont">&#xe60e;</i>写文章</a>
                <% } else { %>
                <a href="/login" class="u_wr_c"><i class="iconfont">&#xe60e;</i>写文章</a>
                <% } %>
            </div>
            <% if (user) { %>
              <a href="javascript:;" class="u_head" @click.stop="switchUserInfo">
                    <% if (user.head) { %>
                        <img  title="<%= user.name %>" src="<%= user.head%>" alt=""> 
                    <% }else{ %>
                        <img  title="<%= user.name %>" src="/img/4965961f1ece63cde79fcf66f9f747c7.png" data-u="<%= user.head%>" alt=""> 
                    <% } %>
                  
              </a>
              <div class="u_use_ctr" v-show="isShowUserInfo">
                    <ul>
                        <li>
                            <a href="/post">写文章</a>
                        </li>
                        <li>
                            <a href="/u/<%= user.name %>">我的主页</a>
                        </li>
                        <li>
                            <a href="/filelist">图片空间</a>
                        </li>
                        <li>
                            <a href="/logout">登出</a>
                        </li>
                    </ul>
                </div>
              <% } else { %>
                <a href="/login" class="u_head">
                    <img style="width:40%;" src=""
                    alt="">
                </a>
              <% } %>
        </div>
</header>
<% } %>